3.1.1 \(\int \frac {\sin ^5(x)}{a+b \cos (x)+c \cos ^2(x)} \, dx\) [1]

Optimal. Leaf size=136 \[ \frac {\left (b^4+2 c^2 (a+c)^2-2 b^2 c (2 a+c)\right ) \tanh ^{-1}\left (\frac {b+2 c \cos (x)}{\sqrt {b^2-4 a c}}\right )}{c^4 \sqrt {b^2-4 a c}}-\frac {\left (b^2-c (a+2 c)\right ) \cos (x)}{c^3}+\frac {b \cos ^2(x)}{2 c^2}-\frac {\cos ^3(x)}{3 c}+\frac {b \left (b^2-2 c (a+c)\right ) \log \left (a+b \cos (x)+c \cos ^2(x)\right )}{2 c^4} \]

[Out]

-(b^2-c*(a+2*c))*cos(x)/c^3+1/2*b*cos(x)^2/c^2-1/3*cos(x)^3/c+1/2*b*(b^2-2*c*(a+c))*ln(a+b*cos(x)+c*cos(x)^2)/
c^4+(b^4+2*c^2*(a+c)^2-2*b^2*c*(2*a+c))*arctanh((b+2*c*cos(x))/(-4*a*c+b^2)^(1/2))/c^4/(-4*a*c+b^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.15, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3340, 1671, 648, 632, 212, 642} \begin {gather*} \frac {b \left (b^2-2 c (a+c)\right ) \log \left (a+b \cos (x)+c \cos ^2(x)\right )}{2 c^4}-\frac {\cos (x) \left (b^2-c (a+2 c)\right )}{c^3}+\frac {\left (-2 b^2 c (2 a+c)+2 c^2 (a+c)^2+b^4\right ) \tanh ^{-1}\left (\frac {b+2 c \cos (x)}{\sqrt {b^2-4 a c}}\right )}{c^4 \sqrt {b^2-4 a c}}+\frac {b \cos ^2(x)}{2 c^2}-\frac {\cos ^3(x)}{3 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[x]^5/(a + b*Cos[x] + c*Cos[x]^2),x]

[Out]

((b^4 + 2*c^2*(a + c)^2 - 2*b^2*c*(2*a + c))*ArcTanh[(b + 2*c*Cos[x])/Sqrt[b^2 - 4*a*c]])/(c^4*Sqrt[b^2 - 4*a*
c]) - ((b^2 - c*(a + 2*c))*Cos[x])/c^3 + (b*Cos[x]^2)/(2*c^2) - Cos[x]^3/(3*c) + (b*(b^2 - 2*c*(a + c))*Log[a
+ b*Cos[x] + c*Cos[x]^2])/(2*c^4)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1671

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 3340

Int[((a_.) + (b_.)*(cos[(d_.) + (e_.)*(x_)]*(f_.))^(n_.) + (c_.)*(cos[(d_.) + (e_.)*(x_)]*(f_.))^(n2_.))^(p_.)
*sin[(d_.) + (e_.)*(x_)]^(m_.), x_Symbol] :> Module[{g = FreeFactors[Cos[d + e*x], x]}, Dist[-g/e, Subst[Int[(
1 - g^2*x^2)^((m - 1)/2)*(a + b*(f*g*x)^n + c*(f*g*x)^(2*n))^p, x], x, Cos[d + e*x]/g], x]] /; FreeQ[{a, b, c,
 d, e, f, n, p}, x] && EqQ[n2, 2*n] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\sin ^5(x)}{a+b \cos (x)+c \cos ^2(x)} \, dx &=-\text {Subst}\left (\int \frac {\left (1-x^2\right )^2}{a+b x+c x^2} \, dx,x,\cos (x)\right )\\ &=-\text {Subst}\left (\int \left (\frac {b^2-c (a+2 c)}{c^3}-\frac {b x}{c^2}+\frac {x^2}{c}-\frac {-a^2 c-c^3+a \left (b^2-2 c^2\right )+b \left (b^2-2 c (a+c)\right ) x}{c^3 \left (a+b x+c x^2\right )}\right ) \, dx,x,\cos (x)\right )\\ &=-\frac {\left (b^2-c (a+2 c)\right ) \cos (x)}{c^3}+\frac {b \cos ^2(x)}{2 c^2}-\frac {\cos ^3(x)}{3 c}+\frac {\text {Subst}\left (\int \frac {-a^2 c-c^3+a \left (b^2-2 c^2\right )+b \left (b^2-2 c (a+c)\right ) x}{a+b x+c x^2} \, dx,x,\cos (x)\right )}{c^3}\\ &=-\frac {\left (b^2-c (a+2 c)\right ) \cos (x)}{c^3}+\frac {b \cos ^2(x)}{2 c^2}-\frac {\cos ^3(x)}{3 c}+\frac {\left (b \left (b^2-2 c (a+c)\right )\right ) \text {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,\cos (x)\right )}{2 c^4}-\frac {\left (b^4+2 c^2 (a+c)^2-2 b^2 c (2 a+c)\right ) \text {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,\cos (x)\right )}{2 c^4}\\ &=-\frac {\left (b^2-c (a+2 c)\right ) \cos (x)}{c^3}+\frac {b \cos ^2(x)}{2 c^2}-\frac {\cos ^3(x)}{3 c}+\frac {b \left (b^2-2 c (a+c)\right ) \log \left (a+b \cos (x)+c \cos ^2(x)\right )}{2 c^4}+\frac {\left (b^4+2 c^2 (a+c)^2-2 b^2 c (2 a+c)\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c \cos (x)\right )}{c^4}\\ &=\frac {\left (b^4+2 c^2 (a+c)^2-2 b^2 c (2 a+c)\right ) \tanh ^{-1}\left (\frac {b+2 c \cos (x)}{\sqrt {b^2-4 a c}}\right )}{c^4 \sqrt {b^2-4 a c}}-\frac {\left (b^2-c (a+2 c)\right ) \cos (x)}{c^3}+\frac {b \cos ^2(x)}{2 c^2}-\frac {\cos ^3(x)}{3 c}+\frac {b \left (b^2-2 c (a+c)\right ) \log \left (a+b \cos (x)+c \cos ^2(x)\right )}{2 c^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.59, size = 239, normalized size = 1.76 \begin {gather*} \frac {3 c \left (-4 b^2+c (4 a+7 c)\right ) \cos (x)+3 b c^2 \cos (2 x)-c^3 \cos (3 x)+\frac {6 \left (-b^4-2 c^2 (a+c)^2+2 b^2 c (2 a+c)+b^3 \sqrt {b^2-4 a c}-2 b c (a+c) \sqrt {b^2-4 a c}\right ) \log \left (-b+\sqrt {b^2-4 a c}-2 c \cos (x)\right )}{\sqrt {b^2-4 a c}}+\frac {6 \left (b^4+2 c^2 (a+c)^2-2 b^2 c (2 a+c)+b^3 \sqrt {b^2-4 a c}-2 b c (a+c) \sqrt {b^2-4 a c}\right ) \log \left (b+\sqrt {b^2-4 a c}+2 c \cos (x)\right )}{\sqrt {b^2-4 a c}}}{12 c^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[x]^5/(a + b*Cos[x] + c*Cos[x]^2),x]

[Out]

(3*c*(-4*b^2 + c*(4*a + 7*c))*Cos[x] + 3*b*c^2*Cos[2*x] - c^3*Cos[3*x] + (6*(-b^4 - 2*c^2*(a + c)^2 + 2*b^2*c*
(2*a + c) + b^3*Sqrt[b^2 - 4*a*c] - 2*b*c*(a + c)*Sqrt[b^2 - 4*a*c])*Log[-b + Sqrt[b^2 - 4*a*c] - 2*c*Cos[x]])
/Sqrt[b^2 - 4*a*c] + (6*(b^4 + 2*c^2*(a + c)^2 - 2*b^2*c*(2*a + c) + b^3*Sqrt[b^2 - 4*a*c] - 2*b*c*(a + c)*Sqr
t[b^2 - 4*a*c])*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*Cos[x]])/Sqrt[b^2 - 4*a*c])/(12*c^4)

________________________________________________________________________________________

Maple [A]
time = 0.78, size = 160, normalized size = 1.18

method result size
default \(\frac {-\frac {\left (\cos ^{3}\left (x \right )\right ) c^{2}}{3}+\frac {\left (\cos ^{2}\left (x \right )\right ) b c}{2}+\cos \left (x \right ) a c -b^{2} \cos \left (x \right )+2 c^{2} \cos \left (x \right )}{c^{3}}+\frac {\frac {\left (-2 c a b +b^{3}-2 c^{2} b \right ) \ln \left (a +b \cos \left (x \right )+c \left (\cos ^{2}\left (x \right )\right )\right )}{2 c}+\frac {2 \left (-a^{2} c +b^{2} a -2 a \,c^{2}-c^{3}-\frac {\left (-2 c a b +b^{3}-2 c^{2} b \right ) b}{2 c}\right ) \arctan \left (\frac {b +2 c \cos \left (x \right )}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{c^{3}}\) \(160\)
risch \(\text {Expression too large to display}\) \(4235\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^5/(a+b*cos(x)+c*cos(x)^2),x,method=_RETURNVERBOSE)

[Out]

1/c^3*(-1/3*cos(x)^3*c^2+1/2*cos(x)^2*b*c+cos(x)*a*c-b^2*cos(x)+2*c^2*cos(x))+1/c^3*(1/2*(-2*a*b*c+b^3-2*b*c^2
)/c*ln(a+b*cos(x)+c*cos(x)^2)+2*(-a^2*c+b^2*a-2*a*c^2-c^3-1/2*(-2*a*b*c+b^3-2*b*c^2)*b/c)/(4*a*c-b^2)^(1/2)*ar
ctan((b+2*c*cos(x))/(4*a*c-b^2)^(1/2)))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^5/(a+b*cos(x)+c*cos(x)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more deta

________________________________________________________________________________________

Fricas [A]
time = 0.51, size = 491, normalized size = 3.61 \begin {gather*} \left [-\frac {2 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} \cos \left (x\right )^{3} - 3 \, {\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} \cos \left (x\right )^{2} - 3 \, {\left (b^{4} - 4 \, a b^{2} c + 4 \, a c^{3} + 2 \, c^{4} + 2 \, {\left (a^{2} - b^{2}\right )} c^{2}\right )} \sqrt {b^{2} - 4 \, a c} \log \left (-\frac {2 \, c^{2} \cos \left (x\right )^{2} + 2 \, b c \cos \left (x\right ) + b^{2} - 2 \, a c + \sqrt {b^{2} - 4 \, a c} {\left (2 \, c \cos \left (x\right ) + b\right )}}{c \cos \left (x\right )^{2} + b \cos \left (x\right ) + a}\right ) + 6 \, {\left (b^{4} c - 5 \, a b^{2} c^{2} + 8 \, a c^{4} + 2 \, {\left (2 \, a^{2} - b^{2}\right )} c^{3}\right )} \cos \left (x\right ) - 3 \, {\left (b^{5} - 6 \, a b^{3} c + 8 \, a b c^{3} + 2 \, {\left (4 \, a^{2} b - b^{3}\right )} c^{2}\right )} \log \left (c \cos \left (x\right )^{2} + b \cos \left (x\right ) + a\right )}{6 \, {\left (b^{2} c^{4} - 4 \, a c^{5}\right )}}, -\frac {2 \, {\left (b^{2} c^{3} - 4 \, a c^{4}\right )} \cos \left (x\right )^{3} - 3 \, {\left (b^{3} c^{2} - 4 \, a b c^{3}\right )} \cos \left (x\right )^{2} - 6 \, {\left (b^{4} - 4 \, a b^{2} c + 4 \, a c^{3} + 2 \, c^{4} + 2 \, {\left (a^{2} - b^{2}\right )} c^{2}\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c \cos \left (x\right ) + b\right )}}{b^{2} - 4 \, a c}\right ) + 6 \, {\left (b^{4} c - 5 \, a b^{2} c^{2} + 8 \, a c^{4} + 2 \, {\left (2 \, a^{2} - b^{2}\right )} c^{3}\right )} \cos \left (x\right ) - 3 \, {\left (b^{5} - 6 \, a b^{3} c + 8 \, a b c^{3} + 2 \, {\left (4 \, a^{2} b - b^{3}\right )} c^{2}\right )} \log \left (c \cos \left (x\right )^{2} + b \cos \left (x\right ) + a\right )}{6 \, {\left (b^{2} c^{4} - 4 \, a c^{5}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^5/(a+b*cos(x)+c*cos(x)^2),x, algorithm="fricas")

[Out]

[-1/6*(2*(b^2*c^3 - 4*a*c^4)*cos(x)^3 - 3*(b^3*c^2 - 4*a*b*c^3)*cos(x)^2 - 3*(b^4 - 4*a*b^2*c + 4*a*c^3 + 2*c^
4 + 2*(a^2 - b^2)*c^2)*sqrt(b^2 - 4*a*c)*log(-(2*c^2*cos(x)^2 + 2*b*c*cos(x) + b^2 - 2*a*c + sqrt(b^2 - 4*a*c)
*(2*c*cos(x) + b))/(c*cos(x)^2 + b*cos(x) + a)) + 6*(b^4*c - 5*a*b^2*c^2 + 8*a*c^4 + 2*(2*a^2 - b^2)*c^3)*cos(
x) - 3*(b^5 - 6*a*b^3*c + 8*a*b*c^3 + 2*(4*a^2*b - b^3)*c^2)*log(c*cos(x)^2 + b*cos(x) + a))/(b^2*c^4 - 4*a*c^
5), -1/6*(2*(b^2*c^3 - 4*a*c^4)*cos(x)^3 - 3*(b^3*c^2 - 4*a*b*c^3)*cos(x)^2 - 6*(b^4 - 4*a*b^2*c + 4*a*c^3 + 2
*c^4 + 2*(a^2 - b^2)*c^2)*sqrt(-b^2 + 4*a*c)*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*cos(x) + b)/(b^2 - 4*a*c)) + 6*(b
^4*c - 5*a*b^2*c^2 + 8*a*c^4 + 2*(2*a^2 - b^2)*c^3)*cos(x) - 3*(b^5 - 6*a*b^3*c + 8*a*b*c^3 + 2*(4*a^2*b - b^3
)*c^2)*log(c*cos(x)^2 + b*cos(x) + a))/(b^2*c^4 - 4*a*c^5)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)**5/(a+b*cos(x)+c*cos(x)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 0.45, size = 153, normalized size = 1.12 \begin {gather*} -\frac {2 \, c^{2} \cos \left (x\right )^{3} - 3 \, b c \cos \left (x\right )^{2} + 6 \, b^{2} \cos \left (x\right ) - 6 \, a c \cos \left (x\right ) - 12 \, c^{2} \cos \left (x\right )}{6 \, c^{3}} + \frac {{\left (b^{3} - 2 \, a b c - 2 \, b c^{2}\right )} \log \left (c \cos \left (x\right )^{2} + b \cos \left (x\right ) + a\right )}{2 \, c^{4}} - \frac {{\left (b^{4} - 4 \, a b^{2} c + 2 \, a^{2} c^{2} - 2 \, b^{2} c^{2} + 4 \, a c^{3} + 2 \, c^{4}\right )} \arctan \left (\frac {2 \, c \cos \left (x\right ) + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} c^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(x)^5/(a+b*cos(x)+c*cos(x)^2),x, algorithm="giac")

[Out]

-1/6*(2*c^2*cos(x)^3 - 3*b*c*cos(x)^2 + 6*b^2*cos(x) - 6*a*c*cos(x) - 12*c^2*cos(x))/c^3 + 1/2*(b^3 - 2*a*b*c
- 2*b*c^2)*log(c*cos(x)^2 + b*cos(x) + a)/c^4 - (b^4 - 4*a*b^2*c + 2*a^2*c^2 - 2*b^2*c^2 + 4*a*c^3 + 2*c^4)*ar
ctan((2*c*cos(x) + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*c^4)

________________________________________________________________________________________

Mupad [B]
time = 2.41, size = 197, normalized size = 1.45 \begin {gather*} \cos \left (x\right )\,\left (\frac {a}{c^2}+\frac {2}{c}-\frac {b^2}{c^3}\right )-\frac {{\cos \left (x\right )}^3}{3\,c}-\frac {\ln \left (c\,{\cos \left (x\right )}^2+b\,\cos \left (x\right )+a\right )\,\left (8\,a^2\,b\,c^2-6\,a\,b^3\,c+8\,a\,b\,c^3+b^5-2\,b^3\,c^2\right )}{2\,\left (4\,a\,c^5-b^2\,c^4\right )}+\frac {b\,{\cos \left (x\right )}^2}{2\,c^2}-\frac {\mathrm {atan}\left (\frac {b}{\sqrt {4\,a\,c-b^2}}+\frac {2\,c\,\cos \left (x\right )}{\sqrt {4\,a\,c-b^2}}\right )\,\left (2\,a^2\,c^2-4\,a\,b^2\,c+4\,a\,c^3+b^4-2\,b^2\,c^2+2\,c^4\right )}{c^4\,\sqrt {4\,a\,c-b^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(x)^5/(a + b*cos(x) + c*cos(x)^2),x)

[Out]

cos(x)*(a/c^2 + 2/c - b^2/c^3) - cos(x)^3/(3*c) - (log(a + b*cos(x) + c*cos(x)^2)*(b^5 - 2*b^3*c^2 + 8*a^2*b*c
^2 + 8*a*b*c^3 - 6*a*b^3*c))/(2*(4*a*c^5 - b^2*c^4)) + (b*cos(x)^2)/(2*c^2) - (atan(b/(4*a*c - b^2)^(1/2) + (2
*c*cos(x))/(4*a*c - b^2)^(1/2))*(4*a*c^3 + b^4 + 2*c^4 + 2*a^2*c^2 - 2*b^2*c^2 - 4*a*b^2*c))/(c^4*(4*a*c - b^2
)^(1/2))

________________________________________________________________________________________